<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>内边距</title>
    <style>
        #d1{
            width: 500px;
            height: 500px;
            border: 1px solid #000000;
        }
        #d2{
            width: 200px;
            height: 200px;
            background-color: pink;
            padding-left: 10px;
            padding-right: 10px;
        }
        #d3{
            width: 200px;
            height: 200px;
            background-color: yellow;
        }
    </style>
</head>
<body>
    <div id="d1">
        <div id="d2">123</div>
        <div id="d3"></div>
    </div>
</body>
</html>